package com.pennysaver.dao.mysql;

import com.pennysaver.dao.UserDao;
import com.pennysaver.model.UserModel;

public class UserMySqlDao implements UserDao {

	@Override
	public void createUser(UserModel user) {

		MySqlConnection
				.executeQuery("insert into pennysaver.user (userName,firstName,lastName,emailAddress,birthDay) "
						+ "values ('"
						+ user.getUserName()
						+ "','"
						+ user.getFirstName()
						+ "','"
						+ user.getLastName()
						+ "','"
						+ user.getEmailAddress()
						+ "','"
						+ new java.sql.Date(user.getBirthDay().getTime())
						+ "')");

	}

}
